package com.dsy.xiangcun_manage.controller;




import com.dsy.tools.entity.TbProvince;
import com.dsy.xiangcun_manage.service.ITbProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dsy
 * @since 2019-12-29
 */
@Controller
@RequestMapping("province")
public class TbProvinceController {

    @Autowired
    ITbProvinceService tbProvinceService;

    @RequestMapping("/getAllProvince")
    @ResponseBody
    public List<TbProvince> getProvince(){
        List<TbProvince> list = tbProvinceService.list();
        return list;
    }

}
